import React, { Component } from 'react'

class Left extends Component {
    render() { 
        let { list, clickBtn } = this.props
        return (
            <div>
                <ul style={{width:'100px', height: '100%', display: 'flex', alignItems: 'center', flexDirection: 'column'}}>
                    {
                        list && list.length ? list.map((item,index) => {
                            return <li key={index} onClick={() => {
                                clickBtn(index)
                            }} style={{paddingTop: '20px'}}>{item.title}</li>
                        }) : <div>暂无数据</div>
                    }
                </ul>
            </div>
        )
    }
}
 
export default Left;